import { IVisitor } from '@/interface';
import { $get, $post, $put, $delete } from '@/request/api';

export function fetchVisitorList(params) {
  return $get('/visitor_log/list', params);
}

export function fetchCreateVisitor(data: IVisitor) {
  return $post('/visitor_log/create', data);
}

export function fetchUpdateVisitor(data: IVisitor) {
  return $put(`/visitor_log/update/${data.id}`, data);
}

export function fetchDeleteVisitor(id: number) {
  return $delete(`/visitor_log/delete/${id}`);
}
